package com.day14.ListIterator;

import java.util.ArrayList;
import java.util.List;

public class ForDemo {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        for(int i:arr){
            System.out.println(i);
        }
        System.out.println("--------");
        String[] strArray={"hello","world","java"};
        for(String str:strArray){
            System.out.println(str);
        }
        System.out.println("--------");
        List<String> list=new ArrayList<String>();
        list.add("hello");
        list.add("world");
        list.add("java");
        for(String s:list){
            System.out.println(s);
        }
        System.out.println("--------");
    }
}
